﻿using System;
using DapperExtensions.Mapper;
using ZLWeb.WebApiEntityBase;

namespace ZLWeb.WebApiEntity.CRM
{
    public class ZklbSettingModel: ResponseResultInfo
    {
        private DateTime _sSsj;
        public int Jqm { get; set; }

        public string KName { get; set; }

        public string Sbm { get; set; }

        public DateTime? Ssrq { get; set; }

        public short kzkhsign { get; set; }
     

        public string Zzr
        {
            get { return "管理员"; }
        }

        public int zklboprid { get; set; }

        public DateTime Szsj { get; set; }

        public int zklbqyday { get; set; }

        public DateTime SSsj
        {
            get { return DateTime.Now.AddDays(zklbqyday); }
        }
    }

    public class ZklbSettingModelMapper : ClassMapper<ZklbSettingModel>
    {
        public ZklbSettingModelMapper()
        {
            Table("#jltycrmkyzklbt");
            Map(f => f.Jqm).Column("zklbid");
            Map(f => f.KName).Column("zklbmc");
            Map(f => f.Sbm).Column("zklbsbm");
            Map(f => f.kzkhsign).Column("kzkhsign");
            //Map(f => f.Ssrq).Column("zklbshixrq");
            Map(f => f.zklboprid).Column("zklboprid");
            Map(f => f.Szsj).Column("zklboprtime");
            Map(f => f.zklbqyday).Column("zklbqyday");
        }
    }
}
